import Vue from 'vue'
import App from './App.vue'
import { createStore } from './store'

// 引入基础组件库
import 'southgisui/lib/sgui-theme/index.css'
import southgisui from 'southgisui'
Vue.use(southgisui)

// 引入滚动条
import 'southgis-scrollbar/scrollbar.css'
import SgScrollbar from 'southgis-scrollbar'
Vue.component('SgScrollbar', SgScrollbar)

// 引入表单组件库
import 'sgui-form/lib/sgui-form.css'
import sguiform from 'sgui-form'
Vue.use(sguiform)

Vue.config.productionTip = false

export function createApp() {
  const store = createStore()

  const app = new Vue({
    store,
    render: h => h(App)
  })

  return { app, store }
}
